{{! corresponding files: commerce_orders_view.php & commerce_orders_view.json }}

{{! ****************************************************************************
{{
{{  HEADER, BACK BUTTON, ETC
{{
{{  ************************************************************************* }}
<header>
	<div class="pure-u-1 pure-u-md-1-2">
		<a class="returnlink current" href="{{www_path}}/commerce/"><div class="icon icon-arw-dwn"></div><!--icon--></a><h4 class="secondary-title">{{ui_title}}</h4>
	</div><!--pure-->
{{! ****************************************************************************
{{
{{  RESEND CONFIRMATION EMAIL
{{
{{  ************************************************************************* }}
	<div class="pure-u-1 pure-u-md-1-2">
			<ul class="inline-subnav">
			<li><a class="lightboxed" href="{{www_path}}/commerce/orders/resend/{{id}}"><div class="icon icon-airplane"></div> {{copy_resend}}</a></li>
			</ul>
	</div><!--pure-->
</header>

<div class="order-detail">
	{{! *************************************************************************
	{{
	{{  DATE, CUSTOMER DETAILS, FULFILLMENT STATUS
	{{
	{{  ********************************************************************** }}
	<div class="material">
        <div class="pure-u-1 pure-u-md-1-3">
            <p><strong>{{copy_placed_on}}</strong> {{order_date}}</p>

					<p><strong>{{copy_customer}}</strong>&nbsp;<a href="mailto:{{customer_email}}">{{customer_name}}</a>
						{{#customer_countrycode}}<br /><strong>{{copy_country}}</strong> {{customer_countrycode}}{{/customer_countrycode}}
					</p>
              <p><strong>{{copy_payment_status}}</strong> {{status}}</p>
            </div><!-- pure-->

        <div class="pure-u-1 pure-u-md-1-3">
            <p><strong>{{copy_order_total}}</strong>${{formatted_gross_price}}<br>
                <strong>{{copy_items_subtotal}}</strong>${{formatted_subtotal}}<br>
                <!--strong>{{copy_transaction_fees}}</strong> ${{service_fee}}<br-->
                {{#formatted_shipping}}  <strong>{{copy_shipping}}</strong>${{formatted_shipping}} <br>{{/formatted_shipping}}

            </p>
            <p><strong>{{copy_net_total}}</strong> ${{formatted_net_price}}</p>

            </div>

	<div class="pure-u-1 pure-u-md-1-3">
		{{#display_shipping_address}}
			<p>
				<strong>{{copy_shipto}}</strong><br />
				{{#customer_shipping_name}}{{customer_shipping_name}}<br />{{/customer_shipping_name}}{{^customer_shipping_name}}{{customer_name}}<br />{{/customer_shipping_name}}
				{{customer_address1}}<br/>
				{{#customer_address2}}{{customer_address2}}<br/>{{/customer_address2}}
				{{customer_city}}, {{customer_region}} {{customer_country}}<br />
				{{customer_postalcode}}
			</p>
		{{/display_shipping_address}}
  </div><!--pure-->

	<div class="pure-u-1">
			{{#physical}}
				{{#fulfilled}}
					<p><strong>{{copy_order_fulfilled}}</strong></p>
				{{/fulfilled}}
				{{^fulfilled}}
					<p><a href="{{www_path}}/commerce/orders/view/{{id}}/fulfilled" class="button">{{copy_mark_as_fulfilled}}</a></p>
				{{/fulfilled}}
			{{/physical}}
	        <!--{{^canceled}}-->
	        <!--<p><a href="{{www_path}}/commerce/orders/view/{{id}}/cancel" class="button">{{copy_cancel}}</a></p>-->
	        <!--{{/canceled}}-->
	</div><!--pure-->
	</div><!--material-->
{{! ****************************************************************************
{{
{{  THE TABLE SHOWING ALL ORDER ITEMS
{{
{{  ************************************************************************* }}
	<h4>{{copy_items_included}}</h4>
	<table style="width:100%;" class="responsive">
		<colgroup style="width:5%;" />
		<colgroup />
		<colgroup style="width:8%;" />
		<thead>
			<tr>
				<th scope="col">{{copy_qty}}</th>
				<th scope="col">{{copy_name}}</th>
				<th scope="col" style="text-align:right;">{{copy_price}}</th>
			</tr>
		</thead>
		<tbody>
	{{#order_contents}}
		<tr>
			<td>{{#qty}}{{qty}}{{/qty}}{{^qty}}1{{/qty}}</td>
			<td>
				<a href="{{www_path}}/commerce/items/edit/{{id}}">{{name}}</a>
				{{#variant}}<span class="fadedtext">{{variant}}</span>{{/variant}}
			</td>
			<td style="text-align:right;">${{price}}</td>
		</tr>
	{{/order_contents}}
		</tbody>
	</table>


</div><!--order-detail-->


{{! ****************************************************************************
{{
{{  ORDER DETAILS
{{
{{  ************************************************************************* }}
<div class="pure-u-1 order-detail">
	<h4>{{copy_transaction_details}}</h4>
	<strong>{{copy_connection_used}}</strong> {{order_connection_details}} <br />
	<strong>{{copy_transaction_id}}</strong> {{service_transaction_id}}<br />
	<strong>{{copy_service_fees}}</strong> ${{service_fee}}
</div><!--pure-->


{{! ****************************************************************************
{{
{{  ORDER NOTES
{{
{{  ************************************************************************* }}
<div class="material drawer breaker pure-u-1{{#notes}} defaultopen{{/notes}}">
    <h5 class="drawerhandle title"><span>{{label_notes}}</span></h5>
    <div class="drawercontent">
      <div class="pure-u-1">
          <form accept-charset="UTF-8" method="post" action="{{www_path}}/commerce/orders/view/{{id}}">
          <textarea id="ordernotes" name="ordernotes" class="taller">{{notes}}</textarea>
          <button type="submit">{{copy_button_notes}}</button>
          </form>
      </div>
    </div>
</div>
